Split out private style context api into a private header
authorMatthias Clasen <mclasen@redhat.com>
Sun, 23 Jan 2011 23:29:07 +0000 (18:29 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 23 Jan 2011 23:29:28 +0000 (18:29 -0500)
gtk/Makefile.am
gtk/gtkcssprovider.c
gtk/gtkstyle.c
gtk/gtkstylecontext.c
gtk/gtkstylecontext.h
gtk/gtkstylecontextprivate.h [new file with mode: 0644]
gtk/gtkwidget.c
gtk/gtkwidgetpath.c

index ca787fdb20cfd302d4ffda5a14fd25c1a77ee485..b95a5d47e6131cec854e8fbe1cd6476218864cb7 100644 (file)
@@ -174,7 +174,6 @@ gtk_public_h_sources =              \
        gtkcellarea.h           \
        gtkcellareacontext.h    \
        gtkcellareabox.h        \
-       gtkcellareaboxcontextprivate.h  \
        gtkcelleditable.h       \
        gtkcelllayout.h         \
        gtkcellrenderer.h       \
@@ -383,6 +382,7 @@ gtk_private_h_sources =             \
        gtkappchooseronline.h   \
        gtkbuilderprivate.h     \
        gtkbuttonprivate.h      \
+       gtkcellareaboxcontextprivate.h  \
        gtkcustompaperunixdialog.h \
        gtkdndcursors.h         \
        gtkentryprivate.h       \
@@ -422,6 +422,7 @@ gtk_private_h_sources =             \
        gtksettingsprivate.h    \
        gtksizegroup-private.h  \
        gtksocketprivate.h      \
+       gtkstylecontextprivate.h \
        gtktextbtree.h          \
        gtktextbufferserialize.h \
        gtktextchildprivate.h   \
index 48349b4b88617d5be5a977b94230824e34d22b74..95dd0683d3a5f639d5281b67da9d84370e713b43 100644 (file)
 
 #include <string.h>
 #include <stdlib.h>
-#include <gtk/gtk.h>
-#include <gtkstyleprovider.h>
+
 #include <gdk-pixbuf/gdk-pixbuf.h>
 #include <cairo-gobject.h>
 
 #include "gtkanimationdescription.h"
 #include "gtk9slice.h"
+#include "gtkgradient.h"
+#include "gtkthemingengine.h"
+#include "gtkstyleprovider.h"
 #include "gtkcssprovider.h"
+#include "gtkstylecontextprivate.h"
 #include "gtkprivate.h"
 
 /**
index a73ebf021b8483f5f19b029e2c5e8c3998b20ac1..e7b87aa1ea0a6e2699e4535bdb38e200de292ace 100644 (file)
@@ -34,6 +34,7 @@
 #include "gtkrc.h"
 #include "gtkspinbutton.h"
 #include "gtkstyle.h"
+#include "gtkstylecontextprivate.h"
 #include "gtkwidget.h"
 #include "gtkiconfactory.h"
 #include "gtkintl.h"
index 1ca794be7b2e78d36f88c63f1b11245353ac23d8..896a98ad1bb1e6e33ef0aa21867cde8c8d2dc2f3 100644 (file)
@@ -23,7 +23,7 @@
 #include <stdlib.h>
 #include <gobject/gvaluecollector.h>
 
-#include "gtkstylecontext.h"
+#include "gtkstylecontextprivate.h"
 #include "gtktypebuiltins.h"
 #include "gtkthemingengine.h"
 #include "gtkintl.h"
index 42eed4beee286bd1dd9a6183db608547ed747e1f..5064afc128b0b67a764275c11eedd74e60bf2228 100644 (file)
@@ -526,7 +526,7 @@ void gtk_style_context_get_style          (GtkStyleContext *context,
                                            ...);
 
 GtkIconSet * gtk_style_context_lookup_icon_set (GtkStyleContext *context,
-                                               const gchar     *stock_id);
+                                                const gchar     *stock_id);
 GdkPixbuf  * gtk_icon_set_render_icon_pixbuf   (GtkIconSet      *icon_set,
                                                 GtkStyleContext *context,
                                                 GtkIconSize      size);
@@ -540,7 +540,7 @@ void             gtk_style_context_set_direction (GtkStyleContext  *context,
 GtkTextDirection gtk_style_context_get_direction (GtkStyleContext  *context);
 
 void             gtk_style_context_set_junction_sides (GtkStyleContext  *context,
-                                                      GtkJunctionSides  sides);
+                                                       GtkJunctionSides  sides);
 GtkJunctionSides gtk_style_context_get_junction_sides (GtkStyleContext  *context);
 
 gboolean gtk_style_context_lookup_color (GtkStyleContext *context,
@@ -573,10 +573,9 @@ void gtk_style_context_get_background_color (GtkStyleContext *context,
 void gtk_style_context_get_border_color     (GtkStyleContext *context,
                                              GtkStateFlags    state,
                                              GdkRGBA         *color);
-
-const PangoFontDescription * gtk_style_context_get_font (GtkStyleContext *context,
-                                                    GtkStateFlags    state);
-
+const PangoFontDescription *
+     gtk_style_context_get_font             (GtkStyleContext *context,
+                                             GtkStateFlags    state);
 void gtk_style_context_get_border           (GtkStyleContext *context,
                                              GtkStateFlags    state,
                                              GtkBorder       *border);
@@ -587,113 +586,101 @@ void gtk_style_context_get_margin           (GtkStyleContext *context,
                                              GtkStateFlags    state,
                                              GtkBorder       *margin);
 
-/* Semi-private API */
-const GValue * _gtk_style_context_peek_style_property (GtkStyleContext *context,
-                                                       GType            widget_type,
-                                                       GtkStateFlags    state,
-                                                       GParamSpec      *pspec);
-void           _gtk_style_context_invalidate_animation_areas (GtkStyleContext *context);
-void           _gtk_style_context_coalesce_animation_areas   (GtkStyleContext *context,
-                                                             GtkWidget       *widget);
-gboolean       _gtk_style_context_check_region_name   (const gchar     *str);
-
+void gtk_style_context_invalidate           (GtkStyleContext *context);
+void gtk_style_context_reset_widgets        (GdkScreen       *screen);
 
-void gtk_style_context_invalidate (GtkStyleContext *context);
-void gtk_style_context_reset_widgets (GdkScreen *screen);
-
-void gtk_style_context_set_background (GtkStyleContext *context,
-                                       GdkWindow       *window);
+void gtk_style_context_set_background       (GtkStyleContext *context,
+                                             GdkWindow       *window);
 
 /* Paint methods */
-void gtk_render_check (GtkStyleContext *context,
-                       cairo_t         *cr,
-                       gdouble          x,
-                       gdouble          y,
-                       gdouble          width,
-                       gdouble          height);
-void gtk_render_option (GtkStyleContext *context,
-                        cairo_t         *cr,
-                        gdouble          x,
-                        gdouble          y,
-                        gdouble          width,
-                        gdouble          height);
-void gtk_render_arrow  (GtkStyleContext *context,
-                        cairo_t         *cr,
-                        gdouble          angle,
-                        gdouble          x,
-                        gdouble          y,
-                        gdouble          size);
-void gtk_render_background (GtkStyleContext *context,
-                            cairo_t         *cr,
-                            gdouble          x,
-                            gdouble          y,
-                            gdouble          width,
-                            gdouble          height);
-void gtk_render_frame  (GtkStyleContext *context,
-                        cairo_t         *cr,
-                        gdouble          x,
-                        gdouble          y,
-                        gdouble          width,
-                        gdouble          height);
-void gtk_render_expander (GtkStyleContext *context,
-                          cairo_t         *cr,
-                          gdouble          x,
-                          gdouble          y,
-                          gdouble          width,
-                          gdouble          height);
-void gtk_render_focus    (GtkStyleContext *context,
-                          cairo_t         *cr,
-                          gdouble          x,
-                          gdouble          y,
-                          gdouble          width,
-                          gdouble          height);
-void gtk_render_layout   (GtkStyleContext *context,
-                          cairo_t         *cr,
-                          gdouble          x,
-                          gdouble          y,
-                          PangoLayout     *layout);
-void gtk_render_line     (GtkStyleContext *context,
-                          cairo_t         *cr,
-                          gdouble          x0,
-                          gdouble          y0,
-                          gdouble          x1,
-                          gdouble          y1);
-void gtk_render_slider   (GtkStyleContext *context,
-                          cairo_t         *cr,
-                          gdouble          x,
-                          gdouble          y,
-                          gdouble          width,
-                          gdouble          height,
-                          GtkOrientation   orientation);
-void gtk_render_frame_gap (GtkStyleContext *context,
-                           cairo_t         *cr,
-                           gdouble          x,
-                           gdouble          y,
-                           gdouble          width,
-                           gdouble          height,
-                           GtkPositionType  gap_side,
-                           gdouble          xy0_gap,
-                           gdouble          xy1_gap);
-void gtk_render_extension (GtkStyleContext *context,
-                           cairo_t         *cr,
-                           gdouble          x,
-                           gdouble          y,
-                           gdouble          width,
-                           gdouble          height,
-                           GtkPositionType  gap_side);
-void gtk_render_handle    (GtkStyleContext *context,
-                           cairo_t         *cr,
-                           gdouble          x,
-                           gdouble          y,
-                           gdouble          width,
-                           gdouble          height);
-void gtk_render_activity  (GtkStyleContext *context,
-                           cairo_t         *cr,
-                           gdouble          x,
-                           gdouble          y,
-                           gdouble          width,
-                           gdouble          height);
-
+void        gtk_render_check       (GtkStyleContext     *context,
+                                    cairo_t             *cr,
+                                    gdouble              x,
+                                    gdouble              y,
+                                    gdouble              width,
+                                    gdouble              height);
+void        gtk_render_option      (GtkStyleContext     *context,
+                                    cairo_t             *cr,
+                                    gdouble              x,
+                                    gdouble              y,
+                                    gdouble              width,
+                                    gdouble              height);
+void        gtk_render_arrow       (GtkStyleContext     *context,
+                                    cairo_t             *cr,
+                                    gdouble              angle,
+                                    gdouble              x,
+                                    gdouble              y,
+                                    gdouble              size);
+void        gtk_render_background  (GtkStyleContext     *context,
+                                    cairo_t             *cr,
+                                    gdouble              x,
+                                    gdouble              y,
+                                    gdouble              width,
+                                    gdouble              height);
+void        gtk_render_frame       (GtkStyleContext     *context,
+                                    cairo_t             *cr,
+                                    gdouble              x,
+                                    gdouble              y,
+                                    gdouble              width,
+                                    gdouble              height);
+void        gtk_render_expander    (GtkStyleContext     *context,
+                                    cairo_t             *cr,
+                                    gdouble              x,
+                                    gdouble              y,
+                                    gdouble              width,
+                                    gdouble              height);
+void        gtk_render_focus       (GtkStyleContext     *context,
+                                    cairo_t             *cr,
+                                    gdouble              x,
+                                    gdouble              y,
+                                    gdouble              width,
+                                    gdouble              height);
+void        gtk_render_layout      (GtkStyleContext     *context,
+                                    cairo_t             *cr,
+                                    gdouble              x,
+                                    gdouble              y,
+                                    PangoLayout         *layout);
+void        gtk_render_line        (GtkStyleContext     *context,
+                                    cairo_t             *cr,
+                                    gdouble              x0,
+                                    gdouble              y0,
+                                    gdouble              x1,
+                                    gdouble              y1);
+void        gtk_render_slider      (GtkStyleContext     *context,
+                                    cairo_t             *cr,
+                                    gdouble              x,
+                                    gdouble              y,
+                                    gdouble              width,
+                                    gdouble              height,
+                                    GtkOrientation       orientation);
+void        gtk_render_frame_gap   (GtkStyleContext     *context,
+                                    cairo_t             *cr,
+                                    gdouble              x,
+                                    gdouble              y,
+                                    gdouble              width,
+                                    gdouble              height,
+                                    GtkPositionType      gap_side,
+                                    gdouble              xy0_gap,
+                                    gdouble              xy1_gap);
+void        gtk_render_extension   (GtkStyleContext     *context,
+                                    cairo_t             *cr,
+                                    gdouble              x,
+                                    gdouble              y,
+                                    gdouble              width,
+                                    gdouble              height,
+                                    GtkPositionType      gap_side);
+void        gtk_render_handle      (GtkStyleContext     *context,
+                                    cairo_t             *cr,
+                                    gdouble              x,
+                                    gdouble              y,
+                                    gdouble              width,
+                                    gdouble              height);
+void        gtk_render_activity    (GtkStyleContext     *context,
+                                    cairo_t             *cr,
+                                    gdouble              x,
+                                    gdouble              y,
+                                    gdouble              width,
+                                    gdouble              height);
 GdkPixbuf * gtk_render_icon_pixbuf (GtkStyleContext     *context,
                                     const GtkIconSource *source,
                                     GtkIconSize          size);
diff --git a/gtk/gtkstylecontextprivate.h b/gtk/gtkstylecontextprivate.h
new file mode 100644 (file)
index 0000000..de70308
--- /dev/null
@@ -0,0 +1,40 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2010 Carlos Garnacho <carlosg@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GTK_STYLE_CONTEXT_PRIVATE_H__
+#define __GTK_STYLE_CONTEXT_PRIVATE_H__
+
+#include "gtkstylecontext.h"
+
+G_BEGIN_DECLS
+
+
+const GValue * _gtk_style_context_peek_style_property        (GtkStyleContext *context,
+                                                              GType            widget_type,
+                                                              GtkStateFlags    state,
+                                                              GParamSpec      *pspec);
+void           _gtk_style_context_invalidate_animation_areas (GtkStyleContext *context);
+void           _gtk_style_context_coalesce_animation_areas   (GtkStyleContext *context,
+                                                              GtkWidget       *widget);
+gboolean       _gtk_style_context_check_region_name          (const gchar     *str);
+
+
+G_END_DECLS
+
+#endif /* __GTK_STYLE_CONTEXT_PRIVATE_H__ */
index 37316be729c8263658c12d3437cc99a9ea4690d6..7558b76aa70e513b3dc1e8e9136e518d98dc6080 100644 (file)
@@ -56,7 +56,7 @@
 #include "gtkbuildable.h"
 #include "gtkbuilderprivate.h"
 #include "gtksizerequest.h"
-#include "gtkstylecontext.h"
+#include "gtkstylecontextprivate.h"
 #include "gtksymboliccolor.h"
 #include "gtkcssprovider.h"
 #include "gtkanimationdescription.h"
index 40f1cac16b9e060ef712118bb243d8cd045cbcc6..431cc4bb09ad8a673a1d00a8f99955a377d9eb22 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "gtkwidget.h"
 #include "gtkwidgetpath.h"
+#include "gtkstylecontextprivate.h"
 
 /**
  * SECTION:gtkwidgetpath